Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
콘텐츠 검색 및 필터링 기능 구현
변경 사항
GET /contents/?title=Test&category=Movie
와 같은 방식으로 검색 가능변경된 파일
app/content.py
: 검색 및 필터링 기능 추가tests/test_content.py
: 검색 및 필터링 기능에 대한 테스트 추가변경 이유
체크리스트
title
쿼리 파라미터)category
쿼리 파라미터)테스트 방법
source venv/bin/activate
uvicorn app.main:app --reload
pytest
를 사용하여 테스트 실행:GET /contents/?title=Test
로 제목이 "Test"인 콘텐츠 조회GET /contents/?category=Movie
로 카테고리가 "Movie"인 콘텐츠 조회GET /contents/?title=Test&category=Movie
GET /contents/
추가된 테스트
test_get_content_with_title_filter
: 제목으로 콘텐츠 필터링 테스트test_get_content_with_category_filter
: 카테고리로 콘텐츠 필터링 테스트test_get_content_with_title_and_category_filter
: 제목과 카테고리 모두로 필터링 테스트참고 사항